Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-observable

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-observable

Check if a value is an Observable

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
752K
decreased by-58.32%
Maintainers
1
Weekly downloads
 
Created

What is is-observable?

The is-observable package is used to check if a value is an RxJS Observable. RxJS Observables are a core part of reactive programming, which involves working with asynchronous data streams. This package provides a simple utility function to determine if a given object conforms to the Observable contract.

What are is-observable's main functionalities?

Check if a value is an Observable

This feature allows developers to verify if a particular value is an RxJS Observable. This is useful in scenarios where type checking is necessary before performing operations on the value assumed to be an Observable.

const isObservable = require('is-observable');
const { Observable } = require('rxjs');

const obs = new Observable(subscriber => {
  subscriber.next('Hello World');
  subscriber.complete();
});

console.log(isObservable(obs)); // true
console.log(isObservable({})); // false

Other packages similar to is-observable

Keywords

FAQs

Package last updated on 06 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc